﻿

Public Class CTOrdenMarketListed

   Private _IdGpoTran     As Integer 
   Private _IdTran        As Integer 

   Private _Portafolio    As String 
   Private _Instrumento   As String 
   Private _Precio        As Decimal 
   Private _CantidadTit   As Decimal
   Private _TipoTran      As String 
   Private _Strategia     As String 
   Private _FecTran       As String  
   Private _FecLiq        As string 
   Private _Broker        As String 

   Private _QuoteMode     As String 
   Private _QtyExpresion  As String 

   Private _MsgValidacion As String 


 
  Default Property Columna (ByVal index As Integer) As Object  
      Get
         Select Case index
             Case 0
                 Return _Portafolio
             Case 1
                 Return _Instrumento
             Case 2
                 Return _Precio
             Case 3
                 Return _CantidadTit
             Case 4
                  Return _TipoTran
             Case 5
                  Return _Strategia
             Case 6
                  Return _FecTran
             Case 7
                  Return _FecLiq
             Case 8
                  Return _Broker
             Case Else
                 
                   Return Nothing 
         End Select
            
      End Get

      Set(ByVal value)

       Select Case index
             Case 0
                  _Portafolio = Value
             Case 1
                 _Instrumento = value
             Case 2
                  
                  If IsNumeric (value)                       
                     _Precio = Math.Abs(Convert.ToDecimal (Value))
                  else
                     _Precio = Value
                  End If
                 
             Case 3

                  If IsNumeric (value)
                     _CantidadTit = Math.Abs ( Math.Truncate (  Convert.ToDecimal (value)))
                  else
                     _CantidadTit = value
                  End If                 
             Case 4
                  _TipoTran = value
             Case 5
                  _Strategia = value
             Case 6
                  _FecTran = value
             Case 7
                  _FecLiq = value
             Case 8
                  _Broker = value             
         End Select


      End Set
  End Property




  Public Property Portafolio() As String
      Get
          Return _Portafolio 
      End Get
      Set(ByVal value As String)
          _Portafolio = value
      End Set
  End Property

  Public Property Instrumento() As String
      Get
          Return _Instrumento 
      End Get
      Set(ByVal value As String)
          _Instrumento = value
      End Set
  End Property

  Public Property Precio() As Decimal 
      Get
          Return _Precio 
      End Get
      Set(ByVal value As Decimal )
           _Precio = Math.Truncate (Math.Abs ( value))
      End Set
  End Property

  Public Property CantidadTit() As decimal
      Get
          Return _CantidadTit 
      End Get
      Set(ByVal value As decimal)
          _CantidadTit = Math.Abs(value)
      End Set
  End Property

  Public Property TipoTran() As String
      Get
          Return _TipoTran 
      End Get
      Set(ByVal value As String)
          _TipoTran = value
      End Set
  End Property

  Public Property Strategia() As String
      Get
          Return _Strategia 
      End Get
      Set(ByVal value As String)
          _Strategia = value
      End Set
  End Property

  Public Property FecTran() As string
      Get
          Return _FecTran 
      End Get
      Set(ByVal value As string)
          _FecTran = value
      End Set
  End Property

  Public Property FecLiq() As String 
      Get
          Return _FecLiq
      End Get
      Set(ByVal value As string)
          _FecLiq = value
      End Set
  End Property

  Public Property Broker() As String
      Get
          Return _Broker 
      End Get
      Set(ByVal value As String)
          _Broker = value
      End Set
  End Property

 

 

       
Public Property QuoteMode() As String
    Get
        Return _QuoteMode
    End Get
    Set(ByVal value As String)
        _QuoteMode = value
    End Set
End Property

Public Property QtyExpresion() As String
    Get
        Return _QtyExpresion 
    End Get
    Set(ByVal value As String)
        _QtyExpresion = value
    End Set
End Property



Public Property MsgValidacion() As String
    Get
        Return _MsgValidacion 
    End Get
    Set(ByVal value As String)
        _MsgValidacion = value
    End Set
End Property




 Public Property IdGpoTran() As Integer 
    Get
        Return _IdGpoTran
    End Get
    Set(ByVal value As integer)
        _IdGpoTran = value
    End Set
End Property



Public Property IdTran() As Integer 
    Get
        Return _IdTran 
    End Get
    Set(ByVal value As integer)
        _IdTran = value
    End Set
End Property





End Class
